from selectors import SelectSelector


def repair_citizens(citizens, expected_outputs):
 # 你的代码将在这里编写
    repaired = []
    for i, citizen in enumerate(citizens):
        if citizen() != expected_outputs[i]:
            def make_repaired_func(expected):
                return lambda:expected
            repaired.append(make_repaired_func(expected_outputs[i]))
        else:
            repaired.append(citizen)
    return repaired

# 市民函数 citizens 以及预期输出 expected_outputs 示例，
citizen1 = lambda: "Hi" # 被病毒篡改后的函数,因为预期输出是 Hello
citizen2 = lambda: "World"
expected_outputs = ["Hello", "World"]
# 调用修复函数
repaired_citizens = repair_citizens([citizen1, citizen2], expected_outputs)
# 测试修复后的市民函数
print(repaired_citizens[0]()) # 应该输出 "Hello"
print(repaired_citizens[1]()) # 应该输出 "World"